<div class="box-content">
	<div class="span12">
		<form class="form-horizontal" method="post" action="<?php echo Yii::app()->createUrl('UrlClass/create');?>">
		    <div class="control-group">
		    	<label class="control-label" for="classname">classname</label>
			    <div class="controls">
			    	<input type="text" id="classname" name="UrlClass[classname]" value="">
			    </div>
		    </div>
		    <div class="control-group">
		    	<label class="control-label" for="displayorder">父类</label>
			    <div class="controls" id='parentids'>
			    	<?php echo $parentClassHtml; ?>
			    </div>
		    </div>
		    <div class="control-group">
		    	<label class="control-label" for="displayorder">displayorder</label>
			    <div class="controls">
			    	<input type="text" id="displayorder" name="UrlClass[displayorder]" value="">
			    </div>
		    </div>
		    <div class="control-group">
		    	<label class="control-label" for="keywords">keywords</label>
			    <div class="controls">
			    	<input type="text" id="keywords" name="UrlClass[keywords]" value="">
			    </div>
		    </div>
		    <div class="control-group">
				<label class="control-label">description</label>
			    <div class="controls">
		             <textarea name='UrlClass[description]'></textarea>
				</div>
		    </div>
		    
		    <div class="control-group">
			    <div class="controls">				    
			    	<button type="submit" class="btn btn-primary">保存</button>
			    	<button type="reset" class="btn">取消</button>
		    	</div>
		    </div>		    
		</form>
	</div>
</div>
<script type="text/javascript">
function selectClass(obj){
	var classid = $(obj).val();
	if(classid != 0){
		$.get("<?php echo Yii::app()->createUrl('UrlClass/ajaxgetlist');?>",{parentid:classid},function(data){
			$('#parentids').html(data);
		})
	} else {
		$(obj).nextAll("select").remove();
	}
	
}		
</script>


